import request from '@/utils/request1';

export const get = (data: {
    id: string,
    level: string;
    pageIndex: number;
    pageSize: number;
    subjectId: string
}) => {
    return request({
        url: '/api/admin/exam/paper/page',
        method: 'post',
        data: data
    });
}

export const subject = () => {
    return request({
        url: "/api/admin/education/subject/list",
        method: 'post'
    })
}

export const edit = (id: string) => {
    return request({
        url: "/api/admin/exam/paper/select/" + id,
        method: 'post'
    })
}

export const quest = (data: any) => {
    return request({
        url: "/api/admin/question/page",
        method: 'post',
        data: data
    })
}

export const search = (id: string) => {
    return request({
        url: "/api/admin/question/select/" + id,
        method: 'post'
    })
}

export const add = (data: any) => {
    return request({
        url: "/api/admin/exam/paper/edit",
        method: 'post',
        data: data
    })
}

export const del = (id: number) => {
    return request({
        url: "/api/admin/exam/paper/delete/" + id,
        method: 'post'
    })
}

export const addquest = (data: any) => {
    return request({
        url: "/api/admin/question/edit",
        method: 'post',
        data: data
    })
}

export const delquest = (id: number) => {
    return request({
        url: "/api/admin/question/delete/" + id,
        method: 'post'
    })
}